package com.veetao.api.dao.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.veetao.api.dao.mapper.UserActionManageMapper;
import com.veetao.api.model.UserAction;
import com.veetao.api.model.UserActionPermission;

/**
 * 
 * @author guohongtao
 * @date 2016年10月24日
 */
@Repository
public class UserActionManageDao {

	@Resource
	private UserActionManageMapper mapper;
	
	
	/**
	 * @return
	 * @author guohongtao
	 */
	public List<UserAction> queryAllUserActions() {
		return mapper.selectAllUserActions();
	}

	/**
	 * @return
	 * @author guohongtao
	 */
	public List<UserActionPermission> queryAllUserActionPermission() {
		return mapper.selectAllActionPermissions();
	}

	public UserActionManageDao() {
		super();
	}

	public UserActionManageMapper getMapper() {
		return mapper;
	}

	public void setMapper(UserActionManageMapper mapper) {
		this.mapper = mapper;
	}

	/**
	 * @param userId
	 * @param date
	 * @return
	 * @author guohongtao
	 */
	public List<UserActionPermission> queryAllPermissionForUser(
			int userId) {
		return mapper.selectAllPermissionsForUser(userId);
	}

}
